package com.chuangjiangx.member.basic.ddd.domain.model;

/**
 * 积分累计规则类型
 */
public enum MbrScoreGrandTotalRuleType {

    PAY("支付积分", (byte) 1);

    public final String name;
    public final byte value;

    MbrScoreGrandTotalRuleType(String name, byte value) {
        this.name = name;
        this.value = value;
    }


    public static MbrScoreGrandTotalRuleType getPlusScoreRuleType(byte value) {
        for (MbrScoreGrandTotalRuleType type : MbrScoreGrandTotalRuleType.values()) {
            if (type.value == value) {
                return type;
            }
        }
        return null;
    }
}
